< previous page page_297 next page >

Page 297
Conclusion
This tutorial introduced some critical concepts that form the basis for computer science. Many Visual Basic programmers do quite nicely without understanding these concepts, but you need to understand them in order to work at an intermediate or advanced level.
You need to understand that a variable is just a way of storing data in memory.
You need to know the relationship between binary and hexadecimal and how to work with hexadecimal digits.
You need to understand that memory is a sequence of bytes, each of which can be accessed by its address, but that on a Win32 system the data is actually transferred 32 bits at a time.
We started this tutorial by observing that the number 5 can be stored in different types of variables, and that as long as you are programming within Visual Basic, the language will usually take care of converting between the variable types so that you are always dealing with the number that you expect. But when you declare an API function, the parameter types that you specify in the Declare statement will define how the data is transferred to the API function. If the format of that data in memory does not exactly match the format expected by the API function, the function will fail or the results will be incorrect.
It will take some time to become comfortable with these conceptsat least, comfortable enough so that they become second nature. Don't worry, you'll run into many examples that are built on these concepts throughout this book. Don't hesitate to come back and review this tutorial any time you are confused. The better you grasp these basic fundamentals, the more success you'll have working with advanced techniques.

 
< previous page page_297 next page >